package com.oraro.paygatewaybiz.channel.wxpay.interfaces;

import com.github.wxpay.sdk.WXPay;
import com.github.wxpay.sdk.WXPayConstants;
import com.github.wxpay.sdk.WXPayUtil;
import com.oraro.common.result.Result;
import com.oraro.paygatewaybiz.channel.wxpay.wxconfig.WXPayConfigDefine;
import com.oraro.paygatewaybiz.constant.Constants;
import com.oraro.paygatewaybiz.exception.RRException;
import com.oraro.paygatewaybiz.module.entity.ChannelEntity;
import com.oraro.paygatewaybiz.module.entity.OrderEntity;
import com.oraro.plugin.inter.IPlugin;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author: jianghuiyong
 * @Date: 2018/11/15 21:22
 * @Version 1.0
 */
public interface WXPayService extends IPlugin {

    Result payOrder(OrderEntity orderEntity, ChannelEntity channelEntity);

    default Map<String, Object> getParam (Object type) {
        Map<String, Object> map = new HashMap<>();
        map.put(Constants.TYPE, Constants.tradePrefix.WX.getType() + type);
        return map;
    }

}
